package cn.jltx.abslistviewadapterdemo.ExpandableEdit;

import java.util.ArrayList;
import java.util.List;

/**
 * @author jltxseo
 *         Created by junlintianxia on 2016/05/04.
 */

public class GroupBean {
    private String group;
    private List<ItemBeanEdit> childList = new ArrayList<ItemBeanEdit>();
    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public List<ItemBeanEdit> getChildList() {
        return childList;
    }

    public void setChildList(List<ItemBeanEdit> childList) {
        this.childList = childList;
    }

    public GroupBean(String group) {
        this.group = group;
    }

    public void addChild(ItemBeanEdit itemBeanEdit){
        if(!childList.contains(itemBeanEdit)){
            childList.add(itemBeanEdit);
        }
    }

    public void removeChild(ItemBeanEdit itemBeanEdit){
        childList.remove(itemBeanEdit);
    }
}
